package com.liguangting.agentsflex.simple;

import com.agentsflex.core.llm.Llm;
import com.agentsflex.core.llm.MessageResponse;
import com.agentsflex.core.message.HumanMessage;
import com.agentsflex.core.message.SystemMessage;
import com.agentsflex.core.prompt.HistoriesPrompt;
import com.agentsflex.llm.qwen.QwenLlm;
import com.agentsflex.llm.qwen.QwenLlmConfig;
import com.liguangting.agentsflex.constant.ApiKeys;


/**
 * @author liguangting
 * @date 2024/7/4
 * @description
 */
public class HistoriesMessageTest {

    public static void main(String[] args) {
        QwenLlmConfig config = new QwenLlmConfig();
        config.setApiKey(ApiKeys.QWEN_API_KEY);
        Llm llm = new QwenLlm(config);

        HistoriesPrompt prompt = new HistoriesPrompt();
        prompt.addMessage(new SystemMessage("你现在是一个数据库开发工程师...."));
        prompt.addMessage(new HumanMessage("请根据 DDL 内容，给出...."));

        MessageResponse response = llm.chat(prompt);

        System.out.println(response);
    }
}
